package com.stylefeng.guns.biz.api.controller;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.stylefeng.guns.biz.api.service.ILotteryService;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.result.BaseResultVo;

/**
 * 控制器
 *
 * @author yangliwei
 * @Date 2018-07-13 19:10:29
 */
@Controller
@RequestMapping("/api/pc/lottery")
public class ApiLotteryController extends BaseController {
	
    @Autowired
    private ILotteryService lotteryService;

    /**
     * 幸运抽奖
     */
    @RequestMapping(value = "/luckyDraw")
    @ResponseBody
    public BaseResultVo luckyDraw(Integer userId, Long activityId) {
    	return lotteryService.luckyDraw(userId, activityId);
    }

    
    /**
     * 查询活动
     */
    @RequestMapping(value = "/queryActivity")
    @ResponseBody
    public BaseResultVo queryActivity(String appId) {
    	return lotteryService.queryActivity(appId);
    }
 

    /**
     * 查询奖项
     */
    @RequestMapping(value = "/queryAwardsList")
    @ResponseBody
    public BaseResultVo queryAwardsList(Long activityId) {
    	return lotteryService.queryAwardsList(activityId);
    }
}
